package day01_07.day01;
/**
 * 删除公共字符
 * https://www.nowcoder.com/practice/f0db4c36573d459cae44ac90b90c6212?tpId=85&&tqId=29868&rp=1&ru=/activity/oj&qru=/ta/2017test/question-ranking
 */

import java.util.*;

public class Main02 {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);

        String str1 = scn.nextLine();
        String str2 = scn.nextLine();
        HashSet<Character> set = new HashSet<>();
        for (int i = 0; i < str2.length(); i++) {
            set.add(str2.charAt(i));
        }
        for (int i = 0; i < str1.length(); i++) {
            if (!set.contains(str1.charAt(i))){
                System.out.print(str1.charAt(i));
            }
        }

    }
}
/**
 * 字符串2映射到哈希表里，然后如果字符串1里的字符在2里面没有的话输出。
 */
